Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update checkmark ListItem styling #2464

Merged
merged 4 commits into from
Oct 1, 2024

Conversation

jorytindall
Copy link
Contributor

@jorytindall jorytindall commented Sep 27, 2024

πŸ“Œ Summary

If merged this PR will update the styling of the selected state checkmark ListItem in the Dropdown to match the other variants.

πŸ› οΈ Detailed description

Currently, the selected state of the checkmark ListItem styles the icon, label, and checkmark with Foreground / Action, which differs from the selected state of the other ListItem's where the icon and label persist the usage of Foreground / Primary.

However, because the checkmark variant is slightly different in interaction, I have left the hover and active states unchanged, only the resting/default state of the selected checkmark has been updated.

image

πŸ“Έ Screenshots

Before
Screenshot 2024-09-27 at 4 02 25β€―PM

After
Screenshot 2024-09-27 at 4 00 54β€―PM

πŸ”— External links

Jira ticket: HDS-3895
Figma file: Figma v2.0 Library | Dropdown


πŸ‘€ Component checklist

πŸ’¬ Please consider using conventional comments when reviewing this PR.

Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Oct 1, 2024 7:57pm
hds-website βœ… Ready (Inspect) Visit Preview Oct 1, 2024 7:57pm

@jorytindall jorytindall requested review from heatherlarsen and a team September 27, 2024 23:15
@jorytindall jorytindall marked this pull request as ready for review September 27, 2024 23:15
Copy link
Member

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't allow me to suggest on removed lines, so I'm leaving a comment here for how we can simplify the CSS and achieve the same result

.hds-dropdown-list-item--variant-checkmark-selected {
  .hds-dropdown-list-item__checkmark {
    color: var(--token-color-foreground-action);
  }
}

main points:

  • color: var(--token-color-foreground-primary); is set by the color modifier, so no need to override it on hds-dropdown-list-item__interactive
  • .hds-dropdown-list-item__checkmark doesn't need to be nested under hds-dropdown-list-item__interactive

@jorytindall
Copy link
Contributor Author

Thanks for the suggestion @alex-ju ! That does indeed simplify things, I've incorporated that change

Copy link
Contributor

@KristinLBradley KristinLBradley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one minor suggestion

Copy link
Contributor

@heatherlarsen heatherlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for the quick update.

cc @Dhaulagiri Here's one other visual change I forgot to mention in our chat today coming out of the Figma v2.0 work

@jorytindall
Copy link
Contributor Author

@KristinLBradley thanks for the suggestion, I've added a bit more context here!

@jorytindall jorytindall merged commit e49dff0 into main Oct 1, 2024
14 checks passed
@jorytindall jorytindall deleted the hds-3895-update-checkmark-list-item branch October 1, 2024 20:06
@hashibot-hds hashibot-hds mentioned this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants